﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ladams.CodeLibrary.Lambda
{
    public static class SelectListIntoCustomObject
    {
        /*
        public static List<object> GetListByFormType(int FormTypeID, string user)
        {
            List<Document> res = null;
            MainDataSet.DOCUMENT_NEWDataTable _table = new MainDataSet.DOCUMENT_NEWDataTable();

            using (MainDataSetTableAdapters.DOCUMENT_NEWTableAdapter _adpt = new DOCUMENT_NEWTableAdapter())
            {

                _adpt.FillByFormTypeID(_table, FormTypeID, "admin");
                //_adpt.FillByFormType(_table, FormTypeID);

                res = _table.AsEnumerable().Select(r =>
                    new Document(user)
                    {
                        _id = r.DOCUMENTID,
                        _fileName = r.FILENAME,
                        _formID = r.FORMID,
                        _folderId = r.FOLDERID,
                        _pages = r.PAGES,
                        _fileType = GetSourceFileType(r.FILETYPE),//.ToLower().Trim() == "pdf") ? SourceFileType.PDF: SourceFileType.TIFF,
                        _sha1hash = r.SHA1HASH,
                        _originalFileName = r.UPLOAD_FILENAME,
                        //_currentStep = GetStepValue(r),
                        _edited = false

                    }).ToList();
            }


            return res;
        }*/

    }
}
